Skip to content

ci: add auto changelog and version update workflows#50

Merged
yCodeTech merged 4 commits into
masterfrom
copilot/add-auto-version-update
Jun 22, 2026
Merged

ci: add auto changelog and version update workflows#50
yCodeTech merged 4 commits into
masterfrom
copilot/add-auto-version-update

Conversation

Copilot AI commented Jun 18, 2026

Copy link
Copy Markdown

Ports the automated changelog and version-bump pipeline from auto-comment-blocks to valet-windows, adapted for a PHP/Composer project.

Workflows

  • changelog-ci.yml — On PR merge, maps the conventional commit type in the PR title to a changelog section (feat→Added, fix→Fixed, etc.) and appends an entry under ## [Unreleased] in CHANGELOG.md. Opens (or updates) a docs: Update changelog PR. Skips PRs labelled skip-changelog, release, auto version bump, dependencies, or typed chore/ci/docs/test/etc.
  • release.yml — On GitHub release (pre/full): validates semver tag, bumps version in cli/version.php via sed, renames ## [Unreleased] to a versioned heading (## [3.5.0](.../tree/v3.5.0) - YYYY-MM-DD), opens a release PR with auto-merge, waits for merge, then moves the tag to the merge commit.
  • setup-labels.yml — Syncs global + local labels on dispatch or file change.

Scripts (invoked via actions/github-script)

  • update-changelog.mjs — Parses PR title, builds and inserts the changelog entry; handles duplicate detection and [Unreleased] section creation.
  • check-changelog-exclusions.mjs — Gates the changelog update by inspecting PR labels and commit type before any file is touched.

Config

  • .github/config/labels.json — Defines skip-changelog and auto version bump labels required by the workflows.

Adaptations from auto-comment-blocks

Concern auto-comment-blocks Here
Version file package.json via npm version cli/version.php via sed
Release link format .../releases/tag/vX.Y.Z .../tree/vX.Y.Z (matches existing CHANGELOG style)
[Unreleased] heading Plain ## [Unreleased] Handles ## [Unreleased](url) variant already in the file
GitHub URL Hard-coded https://github.com ${{ github.server_url }}

Prerequisite: auto-merge must be enabled in repo settings for the release PR to self-merge after CI.

@yCodeTech yCodeTech left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok. But one problem with the original code in auto comment blocks repo is that when you have a title like "feat: added..." or "feat: add..." then it'll get changed to duplicated words for the changelog like "Added added..." or "Added add..."

Copilot AI added 2 commits June 22, 2026 09:30
When a PR title like "feat: add X" or "fix: fixed Y" was processed,
the changelog entry would duplicate the verb: "Added add X" / "Fixed fixed Y".

A new `stripRedundantLeadingWord` helper removes the leading verb from
the cleaned title when it is a form of the prefix already applied to the
entry (e.g. add/adds/added/adding when prefix is "Added"). If stripping
would leave the title empty or whitespace-only, the original is kept.

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Author

Looks ok. But one problem with the original code in auto comment blocks repo is that when you have a title like "feat: added..." or "feat: add..." then it'll get changed to duplicated words for the ch...

Fixed in the latest commits. A stripRedundantLeadingWord helper now strips the leading verb from the cleaned title when it is a common conjugation of the prefix already applied to the entry (e.g. add/adds/added/adding when the prefix is Added). So feat: add X- Added X and fix: fixed a bug- Fixed a bug. If stripping would leave the title empty, the original is kept unchanged.

Copilot AI requested a review from yCodeTech June 22, 2026 09:31
@yCodeTech yCodeTech marked this pull request as ready for review June 22, 2026 09:44
@yCodeTech yCodeTech merged commit f2e7040 into master Jun 22, 2026
@yCodeTech yCodeTech deleted the copilot/add-auto-version-update branch June 22, 2026 09:45
@yCodeTech yCodeTech added the enhancement A quality of life enhancement label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A quality of life enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants